<?xml version="1.0" encoding="utf-8"?>

<div xmlns="http://www.w3.org/1999/xhtml" xid="window" class="window" component="$UI/system/components/justep/window/window"
  design="device:m;">  
  <div component="$UI/system/components/justep/model/model" xid="model" onParamsReceive="modelParamsReceive"
    onLoad="modelLoad" style="top:226px;left:251px;height:auto;">
    <div component="$UI/system/components/justep/data/data" autoLoad="true"
      xid="BarCode" idColumn="code" confirmDelete="false"> 
      <column label="主单ID" name="ID" type="Integer" xid="column2"/>  
      <column label="条码" name="code" type="String" xid="column3"/>  
      <column label="条码类型" name="Type" type="String" xid="column4"/>
    </div> 
  <div component="$UI/system/components/justep/data/data" autoLoad="true" xid="Status" idColumn="fID"><column label="fID" name="fID" type="String" xid="xid1"></column>
  <column label="当前计数" name="Current_Count" type="Integer" xid="xid2"></column>
  <column label="总计" name="Total_Count" type="Integer" xid="xid3"></column>
  <column isCalculate="true" label="剩余计数" name="Rest_Count" type="Integer" xid="xid4"></column>
  <rule xid="rule1">
   <col name="Rest_Count" xid="ruleCol1">
    <calculate xid="calculate1">
     <expr xid="default2">$row.val(&quot;Total_Count&quot;) - $row.val(&quot;Current_Count&quot;)</expr></calculate> </col> </rule>
  <data xid="default3">[{&quot;fID&quot;:&quot;1&quot;,&quot;Current_Count&quot;:20,&quot;Total_Count&quot;:100,&quot;Rest_Count&quot;:0}]</data></div></div>  
  <div component="$UI/system/components/justep/panel/panel" class="x-panel x-full"
    xid="panel1"> 
    <div class="x-panel-top" xid="top1">
      <div component="$UI/system/components/justep/titleBar/titleBar" class="x-titlebar"
        xid="titleBar1"> 
        <div class="x-titlebar-left" xid="left1"/>  
        <div class="x-titlebar-title" xid="title1"><![CDATA[扫码]]></div>  
        <div class="x-titlebar-right reverse" xid="right1"/>
      </div>
    </div>  
    <div class="x-panel-content" xid="content1">
      <div component="$UI/system/components/justep/row/row" class="x-row" xid="row11"> 
        <div class="x-col" xid="col28">
          <label xid="label1"><![CDATA[总计:]]></label>
        <label xid="label4" bind-text='$model.Status.val("Total_Count")'><![CDATA[0]]></label></div>  
        <div class="x-col" xid="col29">
          <label xid="label2"><![CDATA[已扫:]]></label>
        <label xid="label5" bind-text='$model.Status.val("Current_Count")'>label</label></div>  
        <div class="x-col" xid="col30">
          <label xid="label3"><![CDATA[剩余:]]></label>
        <label xid="label6" bind-text='$model.Status.val("Rest_Count")'>label</label></div>
      </div>  
      <div component="$UI/system/components/justep/row/row" class="x-row" xid="row14"
        style="height:40vh;"> 
        <div class="x-col x-scroll-view" xid="col36"> 
          <div class="x-scroll" component="$UI/system/components/justep/scrollView/scrollView"
            xid="scrollView1"> 
            <div class="x-scroll-content" xid="div5"> 
              <div component="$UI/system/components/justep/list/list" class="x-list  x-scroll-view"
                xid="list2" data="BarCode" disableInfiniteLoad="true" disablePullToRefresh="true"> 
                <ul class="x-list-template" xid="listTemplateUl2"> 
                  <li xid="li3"> 
                    <div component="$UI/system/components/justep/row/row" class="x-row"
                      xid="row13" style="padding:0px 0px 0px 0px;margin:0px 0px 0px 0px;"> 
                      <div class="x-col x-col-fixed x-col-center" xid="col24"
                        style="padding:0px 0px 0px 0px;margin:0px 0px 0px 0px;width:auto;"> 
                        <label class="x-label" xid="label11" style="color:#0000FF;width:50px;">编码:</label>
                      </div>  
                      <div class="x-col x-col-fixed x-col-center" xid="col1"
                        style="width:auto;padding:0px;margin:0px;">
                        <div component="$UI/system/components/justep/output/output"
                          class="x-output x-edit" xid="output2" bind-ref="ref(&quot;code&quot;)"
                          style="padding:0px;margin:0px;width:150px;" bind-style="{'backgroundColor':val('Type')==0?&quot;#DFD&quot;:null}"/>
                      </div>
                      <div class="x-col" xid="col2">
                        <i xid="i7" class="e-commerce e-commerce-gou" style="color:#99CC00;"/>
                      </div>
                      <div class="x-col x-col-fixed" xid="col39" style="text-align:right;width:auto;"> 
                        <i xid="DeleteScanCode1" class="icon-close-circled"
                          style="color:#FF0000;font-size:20px;padding-right:15px;"
                          bind-click="DeleteScanCode_i9Click"/>
                      </div> 
                    </div> 
                  </li> 
                </ul> 
              </div> 
            </div> 
          </div> 
        </div> 
      </div>  
      <div component="$UI/system/components/justep/row/row" class="x-row" xid="row12"> 
        <div class="x-col" xid="col31"> 
          <a component="$UI/system/components/justep/button/button" class="btn btn-default"
            label="返回" xid="Return1" icon="e-commerce e-commerce-shangchuan" onClick="Return_ButtonClick"> 
            <i xid="i2" class="e-commerce e-commerce-shangchuan"/>  
            <span xid="span2">返回</span>
          </a> 
        </div>  
        <div class="x-col" xid="col32" style="text-align:center;">
          <a component="$UI/system/components/justep/button/button" class="btn btn-default"
            label="手动输入" xid="InputBtn" icon="linear linear-pencil" onClick="InputBtnClick" bind-visible="false"> 
            <i xid="i1" class="linear linear-pencil"/>  
            <span xid="span1">手动输入</span>
          </a>
        </div>  
        <div class="x-col" xid="col33" style="text-align:right;"> 
          <a component="$UI/system/components/justep/button/button" class="btn btn-default"
            label="继续扫码" xid="ReScan_Button" icon="e-commerce e-commerce-saomiao"
            onClick="ReScan_ButtonClick"> 
            <i xid="i4" class="e-commerce e-commerce-saomiao"/>  
            <span xid="span4">继续扫码</span>
          </a> 
        </div> 
      </div>
    </div>  
    <div class="x-panel-bottom" xid="bottom1"/>
  </div>  
  <span component="$UI/system/components/justep/windowDialog/windowDialog" xid="windowDialog1"
    src="./ManualInput.w" width="90%" height="195px" status="normal" top="30px" showTitle="true"/>
</div>
